package com.hexu.event.view;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Timer;

import static com.hexu.event.view.UserTableView.freezeDate;

//还没使用这个
public class TimerTest02 {
    Timer timer;

    public TimerTest02() throws ParseException {
        Date time = getTime();
        //指定时间执行线程任务
        timer = new Timer();
        timer.schedule(new TimerTaskTest02(), time);
    }

    public Date getTime() throws ParseException {
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date time = dateFormat.parse(freezeDate);

        return time;
    }

    public static void main(String[] args) throws ParseException {
        new TimerTest02();
    }
}

